package com.senyuyin.diancanspringboot.controller;

import com.senyuyin.diancanspringboot.domain.FoodClass;
import com.senyuyin.diancanspringboot.service.FoodClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class FoodClassController {
    @Autowired
    private FoodClassService foodClassService;

    @GetMapping("/foodClass")
    public List<FoodClass> getFoodClass(){
        return foodClassService.getAllFoodClass();
    }
}
